02. Create tables for historical stock prices
PRDTM2-787 AI Trading C4 L3 Vid2 Create Tables For Historical Stock Prices
Setting Up a Database for Trading
Learn to define and create database tables for storing historical stock price data.
Core Steps:
- Database Installation: Confirm installation on your trading computer.
- Create Tables: Use SQL commands to set up necessary tables.
Essential Data Points:
- Highest Bid Price: Maximum price to sell stocks.
- Lowest Ask Price: Minimum price to buy stocks.
- Timestamp: Tracks the exact time of events.
- Use SQL’s
timestampdata type for storing precise date-time.
Considerations:
- Network Latency: Affects real-time buying/selling prices.
- Average Prices: Useful for modeling even with latency.
- Trading Costs: Bid/ask prices aid in understanding costs.
Table Definition:
- Specify columns such as
Time,Bid, andAsk. - For
Time, usetimestampor text for flexibility. - For
BidandAsk, define as floating point numbers.
Remember, keep your database organized and ready for effective trading analysis.